package com.yhb.channel.utils;

import com.yhb.channel.model.IBankCard;
import lombok.var;

import java.util.Arrays;
import java.util.List;

public class BlackVerifier implements CardSupportiveVerifier {
    private List<String> list;
    public static BlackVerifier of(String ...bankNames) {
        var instance = new BlackVerifier();
        instance.list = Arrays.asList(bankNames);
        return instance;
    }

    @Override
    public boolean support(IBankCard card) {
        return !list.contains(card.getBankName());
    }
}
